package org.zebra.captcha.sms;

import cn.hutool.extra.spring.SpringUtil;

/**
 * 模版源 (需要实现此接口，可以是数据库，文件等)
 *
 * @author zhanghongbin
 */
public interface SmsCaptchaTemplateSource {

    default String getTemplateId() {
        return SpringUtil.getBean(SmsCaptchaTemplateSource.class).getTemplateId();
    }

    default String getCodeVariableName() {
        return SpringUtil.getBean(SmsCaptchaProperties.class).getCodeVariableName();
    }

    default String getExpirationTimeVariableName() {
        return SpringUtil.getBean(SmsCaptchaProperties.class).getExpirationTimeVariableName();
    }

    default String getConfigId() {
        return SpringUtil.getBean(SmsCaptchaProperties.class).getConfigId();
    }
}
